/*
https://leetcode-cn.com/problems/power-of-four/solution/4de-mi-by-leetcode-solution-b3ya/
 */
public class Solution342 {
    public boolean isPowerOfFour(int n) {
        return n>0 && (n&(n-1))==0 && n%3==1;
    }

    public static void main(String[] args) {
        System.out.println(new Solution342().isPowerOfFour(16));
    }
}
